using Google.ProtocolBuffers;
using Google.ProtocolBuffers.Collections;
using micromsg.Proto;
using System;
using System.CodeDom.Compiler;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Runtime.CompilerServices;
namespace micromsg
{
	[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
	public sealed class DelMsg : GeneratedMessageLite<DelMsg, DelMsg.Builder>
	{
		[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
		public sealed class Builder : GeneratedBuilderLite<DelMsg, DelMsg.Builder>
		{
			private bool resultIsReadOnly;
			private DelMsg result;
			protected override DelMsg.Builder ThisBuilder
			{
				get
				{
					return this;
				}
			}
			public override bool IsInitialized
			{
				get
				{
					return this.result.IsInitialized;
				}
			}
			protected override DelMsg MessageBeingBuilt
			{
				get
				{
					return this.PrepareBuilder();
				}
			}
			public override DelMsg DefaultInstanceForType
			{
				get
				{
					return DelMsg.DefaultInstance;
				}
			}
			public SKBuiltinString_t UserName
			{
				get
				{
					return this.result.UserName;
				}
				set
				{
					this.SetUserName(value);
				}
			}
			public uint Count
			{
				get
				{
					return this.result.Count;
				}
				set
				{
					this.SetCount(value);
				}
			}
			public IPopsicleList<int> MsgIdListList
			{
				get
				{
					return this.PrepareBuilder().msgIdList_;
				}
			}
			public int MsgIdListCount
			{
				get
				{
					return this.result.MsgIdListCount;
				}
			}
			public Builder()
			{
				this.result = DelMsg.DefaultInstance;
				this.resultIsReadOnly = true;
			}
			internal Builder(DelMsg cloneFrom)
			{
				this.result = cloneFrom;
				this.resultIsReadOnly = true;
			}
			private DelMsg PrepareBuilder()
			{
				if (this.resultIsReadOnly)
				{
					DelMsg other = this.result;
					this.result = new DelMsg();
					this.resultIsReadOnly = false;
					this.MergeFrom(other);
				}
				return this.result;
			}
			public override DelMsg.Builder Clear()
			{
				this.result = DelMsg.DefaultInstance;
				this.resultIsReadOnly = true;
				return this;
			}
			public override DelMsg.Builder Clone()
			{
				if (this.resultIsReadOnly)
				{
					return new DelMsg.Builder(this.result);
				}
				return new DelMsg.Builder().MergeFrom(this.result);
			}
			public override DelMsg BuildPartial()
			{
				if (this.resultIsReadOnly)
				{
					return this.result;
				}
				this.resultIsReadOnly = true;
				return this.result.MakeReadOnly();
			}
			public override DelMsg.Builder MergeFrom(IMessageLite other)
			{
				if (other is DelMsg)
				{
					return this.MergeFrom((DelMsg)other);
				}
				base.MergeFrom(other);
				return this;
			}
			public override DelMsg.Builder MergeFrom(DelMsg other)
			{
				return this;
			}
			public override DelMsg.Builder MergeFrom(ICodedInputStream input)
			{
				return this.MergeFrom(input, ExtensionRegistry.Empty);
			}
			public override DelMsg.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
			{
				this.PrepareBuilder();
				uint num;
				string text;
				while (input.ReadTag(out num, out text))
				{
					if (num == 0u && text != null)
					{
						int num2 = Array.BinarySearch<string>(DelMsg._delMsgFieldNames, text, StringComparer.get_Ordinal());
						if (num2 < 0)
						{
							this.ParseUnknownField(input, extensionRegistry, num, text);
							continue;
						}
						num = DelMsg._delMsgFieldTags[num2];
					}
					uint num3 = num;
					if (num3 <= 10u)
					{
						if (num3 == 0u)
						{
							throw InvalidProtocolBufferException.InvalidTag();
						}
						if (num3 == 10u)
						{
							SKBuiltinString_t.Builder builder = SKBuiltinString_t.CreateBuilder();
							if (this.result.hasUserName)
							{
								builder.MergeFrom(this.UserName);
							}
							input.ReadMessage(builder, extensionRegistry);
							this.UserName = builder.BuildPartial();
							continue;
						}
					}
					else
					{
						if (num3 == 16u)
						{
							this.result.hasCount = input.ReadUInt32(ref this.result.count_);
							continue;
						}
						switch (num3)
						{
						case 24u:
						case 26u:
							input.ReadInt32Array(num, text, this.result.msgIdList_);
							continue;
						}
					}
					if (WireFormat.IsEndGroupTag(num))
					{
						return this;
					}
					this.ParseUnknownField(input, extensionRegistry, num, text);
				}
				return this;
			}
			public DelMsg.Builder SetUserName(SKBuiltinString_t value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasUserName = true;
				this.result.userName_ = value;
				return this;
			}
			public DelMsg.Builder SetUserName(SKBuiltinString_t.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.hasUserName = true;
				this.result.userName_ = builderForValue.Build();
				return this;
			}
			public DelMsg.Builder MergeUserName(SKBuiltinString_t value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				if (this.result.hasUserName && this.result.userName_ != SKBuiltinString_t.DefaultInstance)
				{
					this.result.userName_ = SKBuiltinString_t.CreateBuilder(this.result.userName_).MergeFrom(value).BuildPartial();
				}
				else
				{
					this.result.userName_ = value;
				}
				this.result.hasUserName = true;
				return this;
			}
			public DelMsg.Builder ClearUserName()
			{
				this.PrepareBuilder();
				this.result.hasUserName = false;
				this.result.userName_ = null;
				return this;
			}
			public DelMsg.Builder SetCount(uint value)
			{
				this.PrepareBuilder();
				this.result.hasCount = true;
				this.result.count_ = value;
				return this;
			}
			public DelMsg.Builder ClearCount()
			{
				this.PrepareBuilder();
				this.result.hasCount = false;
				this.result.count_ = 0u;
				return this;
			}
			public int GetMsgIdList(int index)
			{
				return this.result.GetMsgIdList(index);
			}
			public DelMsg.Builder SetMsgIdList(int index, int value)
			{
				this.PrepareBuilder();
				this.result.msgIdList_[index] = value;
				return this;
			}
			public DelMsg.Builder AddMsgIdList(int value)
			{
				this.PrepareBuilder();
				this.result.msgIdList_.Add(value);
				return this;
			}
			public DelMsg.Builder AddRangeMsgIdList(IEnumerable<int> values)
			{
				this.PrepareBuilder();
				this.result.msgIdList_.Add(values);
				return this;
			}
			public DelMsg.Builder ClearMsgIdList()
			{
				this.PrepareBuilder();
				this.result.msgIdList_.Clear();
				return this;
			}
		}
		public const int UserNameFieldNumber = 1;
		public const int CountFieldNumber = 2;
		public const int MsgIdListFieldNumber = 3;
		private static readonly DelMsg defaultInstance;
		private static readonly string[] _delMsgFieldNames;
		private static readonly uint[] _delMsgFieldTags;
		private bool hasUserName;
		private SKBuiltinString_t userName_;
		private bool hasCount;
		private uint count_;
		private int msgIdListMemoizedSerializedSize;
		private PopsicleList<int> msgIdList_ = new PopsicleList<int>();
		private int memoizedSerializedSize = -1;
		public static DelMsg DefaultInstance
		{
			get
			{
				return DelMsg.defaultInstance;
			}
		}
		public override DelMsg DefaultInstanceForType
		{
			get
			{
				return DelMsg.DefaultInstance;
			}
		}
		protected override DelMsg ThisMessage
		{
			get
			{
				return this;
			}
		}
		public SKBuiltinString_t UserName
		{
			get
			{
				return this.userName_ ?? SKBuiltinString_t.DefaultInstance;
			}
		}
		public uint Count
		{
			get
			{
				return this.count_;
			}
		}
		public IList<int> MsgIdListList
		{
			get
			{
				return Lists.AsReadOnly<int>(this.msgIdList_);
			}
		}
		public int MsgIdListCount
		{
			get
			{
				return this.msgIdList_.Count;
			}
		}
		public override bool IsInitialized
		{
			get
			{
				return this.hasUserName && this.hasCount;
			}
		}
		public override int SerializedSize
		{
			get
			{
				int num = this.memoizedSerializedSize;
				if (num != -1)
				{
					return num;
				}
				num = 0;
				if (this.hasUserName)
				{
					num += CodedOutputStream.ComputeMessageSize(1, this.UserName);
				}
				if (this.hasCount)
				{
					num += CodedOutputStream.ComputeUInt32Size(2, this.Count);
				}
				int num2 = 0;
				using (IEnumerator<int> enumerator = this.MsgIdListList.GetEnumerator())
				{
					while (enumerator.MoveNext())
					{
						int current = enumerator.get_Current();
						num2 += CodedOutputStream.ComputeInt32SizeNoTag(current);
					}
				}
				num += num2;
				if (this.msgIdList_.Count != 0)
				{
					num += 1 + CodedOutputStream.ComputeInt32SizeNoTag(num2);
				}
				this.msgIdListMemoizedSerializedSize = num2;
				this.memoizedSerializedSize = num;
				return num;
			}
		}
		private DelMsg()
		{
		}
		public int GetMsgIdList(int index)
		{
			return this.msgIdList_[index];
		}
		public override void WriteTo(ICodedOutputStream output)
		{
			int arg_06_0 = this.SerializedSize;
			string[] delMsgFieldNames = DelMsg._delMsgFieldNames;
			if (this.hasUserName)
			{
				output.WriteMessage(1, delMsgFieldNames[2], this.UserName);
			}
			if (this.hasCount)
			{
				output.WriteUInt32(2, delMsgFieldNames[0], this.Count);
			}
			if (this.msgIdList_.Count > 0)
			{
				output.WritePackedInt32Array(3, delMsgFieldNames[1], this.msgIdListMemoizedSerializedSize, this.msgIdList_);
			}
		}
		public override int GetHashCode()
		{
			int num = base.GetType().GetHashCode();
			if (this.hasUserName)
			{
				num ^= this.userName_.GetHashCode();
			}
			if (this.hasCount)
			{
				num ^= this.count_.GetHashCode();
			}
			using (IEnumerator<int> enumerator = this.msgIdList_.GetEnumerator())
			{
				while (enumerator.MoveNext())
				{
					int current = enumerator.get_Current();
					num ^= current.GetHashCode();
				}
			}
			return num;
		}
		public override bool Equals(object object_0)
		{
			DelMsg delMsg = object_0 as DelMsg;
			if (delMsg == null)
			{
				return false;
			}
			if (this.hasUserName != delMsg.hasUserName || (this.hasUserName && !this.userName_.Equals(delMsg.userName_)))
			{
				return false;
			}
			if (this.hasCount != delMsg.hasCount || (this.hasCount && !this.count_.Equals(delMsg.count_)))
			{
				return false;
			}
			if (this.msgIdList_.Count != delMsg.msgIdList_.Count)
			{
				return false;
			}
			for (int i = 0; i < this.msgIdList_.Count; i++)
			{
				if (!this.msgIdList_[i].Equals(delMsg.msgIdList_[i]))
				{
					return false;
				}
			}
			return true;
		}
		public override void PrintTo(TextWriter writer)
		{
			GeneratedMessageLite<DelMsg, DelMsg.Builder>.PrintField("UserName", this.hasUserName, this.userName_, writer);
			GeneratedMessageLite<DelMsg, DelMsg.Builder>.PrintField("Count", this.hasCount, this.count_, writer);
			GeneratedMessageLite<DelMsg, DelMsg.Builder>.PrintField<int>("MsgIdList", this.msgIdList_, writer);
		}
		public static DelMsg ParseFrom(byte[] data)
		{
			return DelMsg.CreateBuilder().MergeFrom(data).BuildParsed();
		}
		private DelMsg MakeReadOnly()
		{
			this.msgIdList_.MakeReadOnly();
			return this;
		}
		public static DelMsg.Builder CreateBuilder()
		{
			return new DelMsg.Builder();
		}
		public override DelMsg.Builder ToBuilder()
		{
			return DelMsg.CreateBuilder(this);
		}
		public override DelMsg.Builder CreateBuilderForType()
		{
			return new DelMsg.Builder();
		}
		public static DelMsg.Builder CreateBuilder(DelMsg prototype)
		{
			return new DelMsg.Builder(prototype);
		}
		static DelMsg()
		{
			DelMsg.defaultInstance = new DelMsg().MakeReadOnly();
			DelMsg._delMsgFieldNames = new string[]
			{
				"Count",
				"MsgIdList",
				"UserName"
			};
			DelMsg._delMsgFieldTags = new uint[]
			{
				16u,
				26u,
				10u
			};
			object.ReferenceEquals(micromsg.Proto.DelMsg.Descriptor, null);
		}
	}
}
